  // Likhodeeva Maria
  // 2012.11.12
  // This programme counts a the distance from a direct to a plane.


program PlaneDirect;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
  x1, y1, z1, x2, y2, z2, x3, y3, z3, x0, y0, z0, a, b, c, d: Integer;
  D0, t: Real;

begin
  readln (x1, y1, z1, x2, y2, z2, x3, y3, z3, x0, y0, z0);
  a:=(y1-y2)*(z2-z3)-(y2-y3)*(z1-z2);
  b:=(x2-x3)*(z1-z2)-(x1-x2)*(z2-z3);
  c:=(x1-x2)*(y2-y3)-(x2-x3)*(y1-y2);
  d:=-(a*x1+b*y1+c*z1);
  if (a*a + b*b + c*c<>0) then
  begin
    t:=sqrt(a*a + b*b + c*c);
    D0:=abs((a*x0+b*y0+c*z0+d)/t);
  end else begin
    D0:=0;
  end;
  Writeln (D0);
  Readln;
end.
